[Doxygen] How to documenting global dependencies for functions?
Posted
by Thomas Matthews
on Stack Overflow
See other posts from Stack Overflow
or by Thomas Matthews
Published on 2010-05-06T17:58:31Z
Indexed on
2010/05/06
19:58 UTC
Read the original article
Hit count: 377
I've got some C code from a 3rd party vendor (for an embedded platform) that uses global variables (for speed & space optimizations). I'm documenting the code, converting to Doxygen
format.
How do I put a note in the function documentation that the function requires on global variables and functions?
Doxygen
has special commands for annotating parameters and return values as describe here: Doxygen Special Commands. I did not see any commands for global variables.
Example C code:
extern unsigned char data_buffer[]; //!< Global variable.
/*! Returns the next available data byte.
* \return Next data byte.
*/
unsigned char Get_Byte(void)
{
static unsigned int index = 0;
return data_buffer[index++]; //!< Uses global variable.
}
In the above code, I would like to add Doxygen comments that the function depends on the global variable data_buffer
.
© Stack Overflow or respective owner